FindFirstIndexWhere Generic Method

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Finds the index of the first item in a list that satisfies the condition defined by predicate.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
public static int FindFirstIndexWhere<T>(
	IList<T> list,
	Predicate<T> predicate
)
Visual Basic (Declaration)
Public Shared Function FindFirstIndexWhere(Of T) ( _
	list As IList(Of T), _
	predicate As Predicate(Of T) _
) As Integer
Visual C++
public:
generic<typename T>
static int FindFirstIndexWhere (
	IList<T>^ list, 
	Predicate<T>^ predicate
)

Parameters

list
IList<(Of <T>)>
The list to search.
predicate
Predicate<(Of <T>)>
A delegate that defined the condition to check for.

Return Value

The index of the first item satisfying the condition. -1 if no such item exists in the list.

Type Parameters

T

See Also